<template>
  <div class="dashboard-container">
    <div class="dashboard-text">欢迎{{detail.nickname}}登录管理后台</div>
  </div>
</template>

<script>
import { getToken } from '@/utils/auth'
export default {
  name: 'Dashboard',
  data(){
    return{
      detail:{}
    }
  },
  mounted(){
    this.getDetail()
  },
  methods:{
    //获取用户详情
    async getDetail(){
        const data = await this.$store.dispatch('user/getInfo',getToken())
        this.detail = data
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.tips{
  margin:40px 0;
  .title{
    margin-bottom:10px;
  }
}
.money{
  margin: 20px 0;
  font-size: 24px;
  font-weight: bold;
}
</style>
